/**
 * @license
 * Copyright Akveo. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

@use '../../styles/theming' as *;

@mixin button-ghost() {
  [nbButton].appearance-ghost {
    background-color: nb-theme(button-ghost-background-color);
    border-color: nb-theme(button-ghost-border-color);
    border-style: nb-theme(button-ghost-border-style);
    border-width: nb-theme(button-ghost-border-width);
    text-transform: nb-theme(button-ghost-text-transform);

    &:focus {
      $inset-shadow: nb-theme(button-ghost-focus-inset-shadow-length);
      @include nb-outline(nb-theme(button-outline-width), nb-theme(button-outline-color), $inset-shadow);
    }

    @each $size in nb-get-sizes() {
      &.size-#{$size} {
        padding: nb-theme(button-ghost-#{$size}-padding);
      }
    }

    @each $status in nb-get-statuses() {
      &.status-#{$status} {
        color: nb-theme(button-ghost-#{$status}-text-color);

        &:focus {
          background-color: nb-theme(button-ghost-#{$status}-focus-background-color);
          border-color: nb-theme(button-ghost-#{$status}-focus-border-color);
          color: nb-theme(button-ghost-#{$status}-focus-text-color);
        }

        &:hover {
          background-color: nb-theme(button-ghost-#{$status}-hover-background-color);
          border-color: nb-theme(button-ghost-#{$status}-hover-border-color);
          color: nb-theme(button-ghost-#{$status}-hover-text-color);
        }

        &:active {
          background-color: nb-theme(button-ghost-#{$status}-active-background-color);
          border-color: nb-theme(button-ghost-#{$status}-active-border-color);
          color: nb-theme(button-ghost-#{$status}-active-text-color);
        }

        &[disabled],
        &.btn-disabled {
          background-color: nb-theme(button-ghost-#{$status}-disabled-background-color);
          border-color: nb-theme(button-ghost-#{$status}-disabled-border-color);
          color: nb-theme(button-ghost-#{$status}-disabled-text-color);
        }
      }
    }
  }
}
